<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        *{
            margin: 0 ;
            padding: 0;
        }
        html{
            perspective: 800px;
        }
        div{
            width: 200px;
            height: 200px;
            margin: 0 auto;

            transform-style: preserve-3d;
            animation: divx 10s infinite linear;
            margin-top: 100px;
        }
        div > img{
            width: 200px;
            height: 200px;
            opacity: 0.7;
            vertical-align: top;
            position: absolute;
        }
        div > img:nth-child(1){
            transform: rotateY(90deg) translateZ(100px);
        }
        div > img:nth-child(2){
            transform: rotateY(-90deg) translateZ(100px);
        }
        div > img:nth-child(3){
            transform: rotateX(90deg) translateZ(100px);
        }
        div > img:nth-child(4){
            transform: rotateX(-90deg) translateZ(100px);
        }
        div > img:nth-child(5){
            transform: rotateX(180deg) translateZ(100px);
        }
        div > img:nth-child(6){
            transform: translateZ(100px);
        }

        @keyframes divx {
            from{
                transform: rotateX(0) rotateZ(0);
            }

            to{
                transform: rotateX(1turn) rotateZ(1turn);
            }
        }
    </style>
</head>
<body>
    <div>
        <img src="img/1.jpg" />
        <img src="img/2.jpg" />
        <img src="img/3.jpg" />
        <img src="img/4.jpg" />
        <img src="img/5.jpg" />
        <img src="img/6.jpg" />
    </div>
</body>
</html>